package io.renren.modules.health.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.health.dao.FoodTypeDao;
import io.renren.modules.health.dto.FoodTypeDTO;
import io.renren.modules.health.entity.FoodTypeEntity;
import io.renren.modules.health.service.FoodTypeService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 食品类型
 *
 * @author Mark 
 * @since 1.0.0 2024-03-29
 */
@Service
public class FoodTypeServiceImpl extends CrudServiceImpl<FoodTypeDao, FoodTypeEntity, FoodTypeDTO> implements FoodTypeService {

    @Override
    public QueryWrapper<FoodTypeEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<FoodTypeEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}